<?php
namespace Home\Controller;
use Think\Controller;
class ShareController extends Controller {
    public function index(){
    	$nonceStr=createNonceStr();
    	$jsapi_ticket=getJsApiTicket();
    	$time=time();
    	$url='http://'.$_SERVER['HTTP_HOST'].__SELF__;
    	$string1="jsapi_ticket=".$jsapi_ticket."&noncestr=".$nonceStr."&timestamp=".$time."&url=".$url;
    	$signature=sha1($string1);
    	$data=array(
    		'appId'=>APPID,
    		'timestamp'=>$time,
    		'nonceStr'=>$nonceStr,
    		'signature'=>$signature,
    		'url'=>$url
    		);
    	$this->assign($data);
        $this->display();

    }
     public function test(){
     	var_dump(createNonceStr());
     }
   
} 